package guiservice.common.net;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;
import com.esotericsoftware.kryonet.rmi.ObjectSpace;
import guiservice.common.controls.*;
import guiservice.common.controls.handlers.KeyEventArgs;
import guiservice.common.controls.handlers.MouseEventArgs;
import guiservice.common.controls.handlers.MouseEventType;

public class ProtocolRegistration {

    public static void registerDataObjects(EndPoint endPoint) {
        Kryo kryo = endPoint.getKryo();
        ObjectSpace.registerClasses(kryo);
        kryo.register(Client.class);
        kryo.register(Server.class);
        kryo.register(MouseEventArgs.class);
        kryo.register(KeyEventArgs.class);
        kryo.register(Control.class);
        kryo.register(Window.class);
        kryo.register(Button.class);
        kryo.register(Label.class);
        kryo.register(TextArea.class);
        kryo.register(TextBox.class);
        kryo.register(Long[].class);
        kryo.register(MouseEventType.class);
    }
}
